package com.swt.gap.service;


import com.swt.gap.model.entity.OntologyNode;
import com.swt.gap.model.entity.OntologyNodeProperty;
import com.swt.gap.model.entity.OntologyRelationship;
import com.swt.gap.model.entity.OntologyRelationshipProperty;
import com.swt.gap.model.vo.NodeRelationshipVO;
import com.swt.gap.model.vo.ontology.OntologyNodeVO;
import com.swt.gap.model.vo.OntologyRelationshipVO;
import com.swt.gap.model.vo.OntologyVO;
import com.swt.gap.model.vo.graph.RelationshipBindVO;
import com.swt.gap.model.vo.*;

import java.util.List;

public interface OntologyService {

    OntologyVO getOntologyById(Integer OntologyId);

    List<OntologyNodeVO> listOntologyEntity();

    /**
     * 判断实体类型名称是否重名
     * @param type Integer 实体类型类别
     * @param labels String 实体类型名称,只为二级类别名称
     * @param entityId Integer 实体类型id
     * @return Boolean
     */
    Boolean  judgeLabel(Integer type, String labels, Integer entityId);

    Integer addOntologyEntityAndProperty(OntologyNodeVO ontologyEntityVO);

    Integer updateEntity(Integer entityId, String content, Integer iconId, Integer updateType);

    Integer deleteEntity(Integer entityId);

    OntologyNodeVO getOntologyEntityVO(Integer entityId);

    List<NodeListVO> getOntologyEntityList(Integer type);

    Boolean judgePropertyKey(Integer nodeId, String propertyKey, Integer propertyId);

    Integer addEntityProperty(OntologyNodeProperty ontologyNodeProperty);

    Integer updateEntityProperty(OntologyNodeProperty ontologyNodeProperty);

    Integer deleteEntityProperty(Integer propertyId);

    List<OntologyNode> listSecondEntities();

    Boolean judgeRelationship(OntologyRelationship relationship);

    Integer addRelationship(OntologyRelationshipVO ontologyRelationshipVO);

    Integer updateRelationship(OntologyRelationshipVO ontologyRelationshipVO);

    Integer deleteRelationship(Integer relationshipId);

    RelationshipBindVO getEntityRelationshipVOs(Integer entityId);

    List<NodeRelationshipVO> selectEntityRelationshipVOs(Integer currentId, Integer selectId);

    NodeRelationshipVO selectEntityRelationshipById(Integer relationshipId);

//    List<CountPropertyKeyVO> listCountPropertyKeyByLabels(String[] labels);

    Integer addRelationshipProperty(OntologyRelationshipProperty ontologyRelationshipProperty);

    Integer updateRelationshipProperty(OntologyRelationshipProperty ontologyRelationshipProperty);

    Integer deleteRelationshipProperty(Integer propertyId);

    Boolean judgeRelationshipKey(Integer propertyId, String propertyKey, Integer relationshipId);

    RelationshipVO getRelationship(Integer relationshipId, Integer currentId);

    List<RelationshipAndPropertyVO> listRelationshipByLabels(String startLabels, String endLabels);


}
